package com.wr.hangzhounewlight.controller;

import com.wr.hangzhounewlight.obj.api.recipesissue.RecipeIssueRequest;
import com.wr.hangzhounewlight.obj.api.recipesissue.RecipeIssueResponse;
import com.wr.hangzhounewlight.service.RecipeIssueService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yuanzhizhuo
 * createDate 2025/10/23
 */
@CrossOrigin
@RestController
@AllArgsConstructor
public class RecipeIssueController {

    private final RecipeIssueService service;

    /**
     * 配方下发
     *
     * @param request dto
     * @return 是否下发成功
     */
    @PostMapping("/recipes-issue")
    public RecipeIssueResponse recipeIssue(@RequestBody RecipeIssueRequest request) {
        return service.recipeIssue(request);
    }

}
